package com.example.shop.goods.typehandler;

import com.baomidou.mybatisplus.extension.handlers.JacksonTypeHandler;
import com.example.shop.goods.enums.ShelfState;

public class ShelfStateTypeHandler extends JacksonTypeHandler {

    public ShelfStateTypeHandler() {
        super(ShelfState.class);
    }

    @Override
    protected Object parse(String json) {
        return ShelfState.getShelfState(Integer.parseInt(json));
    }
}
